//
//  DestinationHeaderView.m
//  EDPS
//
//  Created by Neil on 15/11/25.
//  Copyright © 2015年 张维扬. All rights reserved.
//

#import "DestinationHeaderView.h"
#import "DestinationViewController.h"

@implementation DestinationHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
}

#pragma mark - 返回.收藏.分享 按钮和方法

- (void)creatView
{
#pragma mark - 名字lable/喜欢人数lable
    self.titleLable = [[UILabel alloc]initWithFrame:CGRectMake(10, self.frame.size.height -  100, 150, 40)];
//    self.titleLable.backgroundColor = [UIColor purpleColor];
    [self addSubview:self.titleLable];
    
    self.likeLable = [[UILabel alloc]initWithFrame:CGRectMake(10, self.frame.size.height -  50, 150, 40)];
//    self.likeLable.backgroundColor = [UIColor blueColor];
    [self addSubview:self.likeLable];
    
#pragma mark - 浏览图片
//    UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(self.frame.size.width - 110, self.frame.size.height -  50, 40, 40)];
//    imageView.userInteractionEnabled = YES;
//    imageView.image = [UIImage imageNamed:@"iconfont-xiangji"];
//    [self addSubview:imageView];
    
#pragma mark - 浏览数量
//    self.quantityLable = [[UILabel alloc]initWithFrame:CGRectMake(self.frame.size.width - 60, self.frame.size.height -  50, 40, 40)];
//    self.quantityLable.backgroundColor = [UIColor blueColor];
//    [self addSubview:self.quantityLable];
    
    
#pragma mark - 分享按钮
//    UIButton *shareButton = [UIButton buttonWithType:UIButtonTypeCustom];
//    [shareButton addTarget:self action:@selector(shareAction) forControlEvents:UIControlEventTouchUpInside];
//    [self addSubview:shareButton];
//    shareButton.translatesAutoresizingMaskIntoConstraints = NO;
//    [shareButton setBackgroundImage:[UIImage imageNamed:@"iconfont-fenxiang-2"] forState:UIControlStateNormal];
//    
//    NSArray *shareHeight = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|-10-[shareButton(40)]" options:0 metrics:nil views:NSDictionaryOfVariableBindings(shareButton)];
//    
//    NSArray *shareWidth = [NSLayoutConstraint constraintsWithVisualFormat:@"H:[shareButton(40)]-30-|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(shareButton)];
//    
//    [self addConstraints:shareHeight];
//    [self addConstraints:shareWidth];
    
#pragma mark - 收藏按钮
//    UIButton *collectButton = [UIButton buttonWithType:UIButtonTypeCustom];
//    [collectButton addTarget:self action:@selector(collectAction) forControlEvents:UIControlEventTouchUpInside];
//    [self addSubview:collectButton];
//    [collectButton setBackgroundImage:[UIImage imageNamed:@"iconfont-shoucangweishoucang-copy"] forState:UIControlStateNormal];
//    collectButton.translatesAutoresizingMaskIntoConstraints = NO;
//    
//    NSArray *coleHeight = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|-10-[collectButton(40)]" options:0 metrics:nil views:NSDictionaryOfVariableBindings(collectButton)];
//    
//    NSArray *coleWidth = [NSLayoutConstraint constraintsWithVisualFormat:@"H:[collectButton(40)]-90-|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(collectButton)];
//    
//    [self addConstraints:coleHeight];
//    [self addConstraints:coleWidth];
    
}

#pragma mark - 分享方法
- (void)shareAction
{
    NSLog(@"点击分享");
}

#pragma mark - 收藏方法
- (void)collectAction
{
    NSLog(@"点击收藏");
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
